cmake_minimum_required(VERSION 3.8)
project(target_prop_set)

add_executable(hello hello.cpp)

define_property(TARGET PROPERTY target_prop BRIEF_DOCS "docs" FULL_DOCS "full doc")
get_property(var1 TARGET hello PROPERTY target_prop SET)
message(STATUS "target_prop is set? = ${var1}")

set_property(TARGET hello APPEND PROPERTY target_prop "value1")
get_property(var2 TARGET hello PROPERTY target_prop SET)
message(STATUS "target_prop is set? = ${var2}")

set_property(TARGET hello APPEND PROPERTY target_prop2 "value2")
get_property(var3 TARGET hello PROPERTY target_prop2 SET)
message(STATUS "target_prop2 is set? = ${var3}")

set_target_properties(hello PROPERTIES target_prop3 "value3" target_prop4 "value4")
get_property(var4 TARGET hello PROPERTY target_prop3 SET)
message(STATUS "target_prop3 is set? = ${var4}")
get_property(var5 TARGET hello PROPERTY target_prop4 SET)
message(STATUS "target_prop4 is set? = ${var5}")
